package com.kcwl.carrier.infrastructure.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kcwl.carrier.domain.entity.CarrierForeignDriverCondition;
import com.kcwl.carrier.domain.entity.CarrierForeignDriverListInfo;
import com.kcwl.carrier.domain.entity.VehicleTrailerInfo;
import com.kcwl.carrier.infrastructure.repository.po.CarrierCooperationMappingPO;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.List;

/**
 * @Description 外协运力
 * @Author kcwl
 * @Date 2022/11/28 15:10
 */
public interface ForeignDriverMapper extends BaseMapper<CarrierCooperationMappingPO> {
    IPage<CarrierForeignDriverListInfo> getForeignDriverList(Page<VehicleTrailerInfo> page, @org.apache.ibatis.annotations.Param("query") CarrierForeignDriverCondition condition);

    CarrierCooperationMappingPO getForeignDriverDetail(CarrierForeignDriverCondition condition);

    List<Long> selectVehicleIdsByUserId(@Param("userId")Long userId);

    /**
     * 根据用户id获取外协运力车辆id列表
     */
    List<Long> selectDriverIdsByCarrierId(@Param("userId")Long userId);
}
